import os

def grab_images_from_video(video_path:str, save_dir:str,pic_per_second:int =2) -> None:
    '''
    通过ffmpeg 把视频每一秒都抽特定桢出来
    :param video_path: 原视频路径
    :param save_dir: 抽帧以后保存的地址
    :param pic_per_second: 每一秒抽帧数量
    :return:
    '''
    os.system('ffmpeg -i ' + video_path + ' -f image2  -q:v 2 -vf fps=fps='+ str(pic_per_second) +'/1 ' + save_dir + '/image-%d.jpg')